package com.qcby.trigger.http;

import com.qcby.domain.login.model.entity.Captcha;
import com.qcby.domain.login.service.ILoginService;
import com.qcby.types.pojo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 登陆接口
 * @author cong.zhen
 * @date 2024/07/19
 */
@RestController
@RequestMapping("/auth/sso/")
public class LoginController {

    @Resource
    private ILoginService loginService;

    @GetMapping("captcha")
    public Result<Captcha> getCode() {
        return Result.createSuccess(loginService.getCode());
    }
}
